home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Python 1.1 / configure < prev    next >
Encoding:
Text File  |  1994-10-11  |  63.5 KB  |  2,258 lines  |  [TEXT/R*ch]

  1. #!/bin/sh
  2. # From configure.in Revision: 1.8 
  3. #!/bin/sh
  4. # Guess values for system-dependent variables and create Makefiles.
  5. # Generated automatically using autoconf version 1.11 
  6. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  7.  
  8. # This configure script is free software; you can redistribute it and/or
  9. # modify it under the terms of the GNU General Public License as published
  10. # by the Free Software Foundation; either version 2, or (at your option)
  11. # any later version.
  12.  
  13. # This script is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  16. # Public License for more details.
  17.  
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22. # Save the original args to write them into config.status later.
  23. configure_args="$*"
  24.  
  25. # Only options that might do something get documented.
  26. ac_usage="Usage: configure [options] [host]
  27. Options: [defaults in brackets after descriptions]
  28. --build=BUILD        configure for building on BUILD [BUILD=HOST]
  29. --disable-FEATURE    do not include FEATURE (same as --enable-FEATURE=no)
  30. --enable-FEATURE[=ARG]    include FEATURE [ARG=yes]
  31. --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  32. --help            print this message
  33. --host=HOST        configure for HOST [guessed]
  34. --prefix=PREFIX        install host independent files in PREFIX [/usr/local]
  35. --quiet, --silent    do not print \`checking for...' messages
  36. --srcdir=DIR        find the sources in DIR [configure dir or ..]
  37. --target=TARGET        configure for TARGET [TARGET=HOST]
  38. --verbose        print results of checks
  39. --version        print the version of autoconf that created configure
  40. --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  41. --without-PACKAGE    do not use PACKAGE (same as --with-PACKAGE=no)
  42. --x-includes=DIR    X include files are in DIR
  43. --x-libraries=DIR    X library files are in DIR"
  44.  
  45. # Initialize some variables set by options.
  46. # The variables have the same names as the options, with
  47. # dashes changed to underlines.
  48. build=NONE
  49. exec_prefix=
  50. host=NONE
  51. no_create=
  52. nonopt=NONE
  53. norecursion=
  54. prefix=
  55. program_prefix=
  56. program_suffix=
  57. program_transform_name=
  58. silent=
  59. srcdir=
  60. target=NONE
  61. verbose=
  62. x_includes=
  63. x_libraries=
  64.  
  65. ac_prev=
  66. for ac_option
  67. do
  68.  
  69.   # If the previous option needs an argument, assign it.
  70.   if test -n "$ac_prev"; then
  71.     eval "$ac_prev=\$ac_option"
  72.     ac_prev=
  73.     continue
  74.   fi
  75.  
  76.   # Accept (but ignore some of) the important Cygnus configure
  77.   # options, so we can diagnose typos.
  78.  
  79.   case "$ac_option" in
  80.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  81.   *) ac_optarg= ;;
  82.   esac
  83.  
  84.   case "$ac_option" in
  85.  
  86.   -build | --build | --buil | --bui | --bu | --b)
  87.     ac_prev=build ;;
  88.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  89.     build="$ac_optarg" ;;
  90.  
  91.   -disable-* | --disable-*)
  92.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  93.     # Reject names that aren't valid shell variable names.
  94.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  95.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  96.     fi
  97.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  98.     eval "enable_${ac_feature}=no" ;;
  99.  
  100.   -enable-* | --enable-*)
  101.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  102.     # Reject names that aren't valid shell variable names.
  103.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  104.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  105.     fi
  106.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  107.     case "$ac_option" in
  108.       *=*) ;;
  109.       *) ac_optarg=yes ;;
  110.     esac
  111.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  112.  
  113.   # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  114.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  115.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  116.   | --exec | --exe | --ex)
  117.     ac_prev=exec_prefix ;;
  118.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  119.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  120.   | --exec=* | --exe=* | --ex=*)
  121.     exec_prefix="$ac_optarg" ;;
  122.  
  123.   -gas | --gas | --ga | --g)
  124.     with_gas=yes ;; # Obsolete; use --with-gas.
  125.  
  126.   -help | --help | --hel | --he)
  127.     cat << EOF
  128. $ac_usage
  129. EOF
  130.     exit 0 ;;
  131.  
  132.   -host | --host | --hos | --ho)
  133.     ac_prev=host ;;
  134.   -host=* | --host=* | --hos=* | --ho=*)
  135.     host="$ac_optarg" ;;
  136.  
  137.   -nfp | --nfp | --nf)
  138.     with_fp=no ;; # Obsolete; use --without-fp.
  139.  
  140.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  141.   | --no-cr | --no-c)
  142.     no_create=yes ;;
  143.  
  144.   -norecursion | --norecursion | --norecursio | --norecursi \
  145.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
  146.     norecursion=yes ;;
  147.  
  148.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  149.     ac_prev=prefix ;;
  150.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  151.     prefix="$ac_optarg" ;;
  152.  
  153.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  154.   | --program-pre | --program-pr | --program-p)
  155.     ac_prev=program_prefix ;;
  156.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  157.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  158.     program_prefix="$ac_optarg" ;;
  159.  
  160.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  161.   | --program-suf | --program-su | --program-s)
  162.     ac_prev=program_suffix ;;
  163.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  164.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  165.     program_suffix="$ac_optarg" ;;
  166.  
  167.   -program-transform-name | --program-transform-name \
  168.   | --program-transform-nam | --program-transform-na \
  169.   | --program-transform-n | --program-transform- \
  170.   | --program-transform | --program-transfor \
  171.   | --program-transfo | --program-transf \
  172.   | --program-trans | --program-tran \
  173.   | --progr-tra | --program-tr | --program-t)
  174.     ac_prev=program_transform_name ;;
  175.   -program-transform-name=* | --program-transform-name=* \
  176.   | --program-transform-nam=* | --program-transform-na=* \
  177.   | --program-transform-n=* | --program-transform-=* \
  178.   | --program-transform=* | --program-transfor=* \
  179.   | --program-transfo=* | --program-transf=* \
  180.   | --program-trans=* | --program-tran=* \
  181.   | --progr-tra=* | --program-tr=* | --program-t=*)
  182.     program_transform_name="$ac_optarg" ;;
  183.  
  184.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  185.   | -silent | --silent | --silen | --sile | --sil)
  186.     silent=yes ;;
  187.  
  188.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  189.     ac_prev=srcdir ;;
  190.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  191.     srcdir="$ac_optarg" ;;
  192.  
  193.   -target | --target | --targe | --targ | --tar | --ta | --t)
  194.     ac_prev=target ;;
  195.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  196.     target="$ac_optarg" ;;
  197.  
  198.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  199.     verbose=yes ;;
  200.  
  201.   -version | --version | --versio | --versi | --vers)
  202.     echo "configure generated by autoconf version 1.11"
  203.     exit 0 ;;
  204.  
  205.   -with-* | --with-*)
  206.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  207.     # Reject names that aren't valid shell variable names.
  208.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  209.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  210.     fi
  211.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  212.     case "$ac_option" in
  213.       *=*) ;;
  214.       *) ac_optarg=yes ;;
  215.     esac
  216.     eval "with_${ac_package}='$ac_optarg'" ;;
  217.  
  218.   -without-* | --without-*)
  219.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  220.     # Reject names that aren't valid shell variable names.
  221.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  222.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  223.     fi
  224.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  225.     eval "with_${ac_package}=no" ;;
  226.  
  227.   --x) with_x=yes ;; # Obsolete; use --with-x.
  228.  
  229.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  230.   | --x-incl | --x-inc | --x-in | --x-i)
  231.     ac_prev=x_includes ;;
  232.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  233.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  234.     x_includes="$ac_optarg" ;;
  235.  
  236.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  237.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  238.     ac_prev=x_libraries ;;
  239.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  240.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  241.     x_libraries="$ac_optarg" ;;
  242.  
  243.   -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
  244.     ;;
  245.  
  246.   *) 
  247.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  248.       echo "configure: warning: $ac_option: invalid host type" >&2
  249.     fi
  250.     if test "x$nonopt" != xNONE; then
  251.       echo "configure: can only configure for one host and one target at a time" >&2; exit 1
  252.     fi
  253.     nonopt="$ac_option"
  254.     ;;
  255.  
  256.   esac
  257. done
  258.  
  259. if test -n "$ac_prev"; then
  260.   echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
  261. fi
  262.  
  263. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  264. trap 'rm -fr confdefs* $ac_clean_files' 0
  265.  
  266. # Save the original args if we used an alternate arg parser.
  267. ac_configure_temp="${configure_args-$*}"
  268. # Strip out --no-create and --norecursion so they don't pile up.
  269. configure_args=
  270. for ac_arg in $ac_configure_temp; do
  271.   case "$ac_arg" in
  272.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  273.   | --no-cr | --no-c) ;;
  274.   -norecursion | --norecursion | --norecursio | --norecursi \
  275.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  276.   *) configure_args="$configure_args $ac_arg" ;;
  277.   esac
  278. done
  279.  
  280. # NLS nuisances.
  281. # These must not be set unconditionally because not all systems understand
  282. # e.g. LANG=C (notably SCO).
  283. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  284. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  285.  
  286. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  287. rm -rf conftest* confdefs.h
  288. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  289. echo > confdefs.h
  290.  
  291. # A filename unique to this package, relative to the directory that
  292. # configure is in, which we can look for to find out if srcdir is correct.
  293. ac_unique_file=Include/object.h
  294.  
  295. # Find the source files, if location was not specified.
  296. if test -z "$srcdir"; then
  297.   ac_srcdir_defaulted=yes
  298.   # Try the directory containing this script, then `..'.
  299.   ac_prog=$0
  300.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  301.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  302.   srcdir=$ac_confdir
  303.   if test ! -r $srcdir/$ac_unique_file; then
  304.     srcdir=..
  305.   fi
  306. fi
  307. if test ! -r $srcdir/$ac_unique_file; then
  308.   if test x$ac_srcdir_defaulted = xyes; then
  309.     echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  310.   else
  311.     echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  312.   fi
  313. fi
  314. ac_ext=c
  315. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  316. ac_cpp='${CPP}'
  317. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  318.  
  319.  
  320. # Don't suppress compiler output when --verbose is specified
  321. test -n "$verbose" &&
  322.     ac_compile=`echo "$ac_compile" | sed "s|>/dev/null 2>&1||"`
  323. test -n "$verbose" && echo "    setting ac_compile to '$ac_compile'"
  324.  
  325. # checks for alternative programs
  326. test -n "$silent" || echo "checking for --with(out)-gcc"
  327. # check whether --with-gcc or --without-gcc was given.
  328. withval="$with_gcc"
  329. if test -n "$withval"; then
  330.   
  331.     case $withval in
  332.     no)    withval=cc;;
  333.     yes)    withval=gcc;;
  334.     esac
  335.     CC=$withval
  336. fi
  337.  
  338. if test -z "$CC"; then
  339.   # Extract the first word of `gcc', so it can be a program name with args.
  340.   set ac_dummy gcc; ac_word=$2
  341.   test -n "$silent" || echo "checking for $ac_word"
  342.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  343.   for ac_dir in $PATH; do
  344.     test -z "$ac_dir" && ac_dir=.
  345.     if test -f $ac_dir/$ac_word; then
  346.       CC="gcc"
  347.       break
  348.     fi
  349.   done
  350.   IFS="$ac_save_ifs"
  351. fi
  352. test -z "$CC" && CC="cc"
  353. test -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  354.  
  355. # Find out if we are using GNU C, under whatever name.
  356. cat > conftest.c <<EOF
  357. #ifdef __GNUC__
  358.   yes
  359. #endif
  360. EOF
  361. ${CC-cc} -E conftest.c > conftest.out 2>&1
  362. if egrep yes conftest.out >/dev/null 2>&1; then
  363.   GCC=1 # For later tests.
  364. fi
  365. rm -f conftest*
  366.  
  367. if test -z "$RANLIB"; then
  368.   # Extract the first word of `ranlib', so it can be a program name with args.
  369.   set ac_dummy ranlib; ac_word=$2
  370.   test -n "$silent" || echo "checking for $ac_word"
  371.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  372.   for ac_dir in $PATH; do
  373.     test -z "$ac_dir" && ac_dir=.
  374.     if test -f $ac_dir/$ac_word; then
  375.       RANLIB="ranlib"
  376.       break
  377.     fi
  378.   done
  379.   IFS="$ac_save_ifs"
  380. fi
  381. test -z "$RANLIB" && RANLIB=":"
  382. test -n "$RANLIB" && test -n "$verbose" && echo "    setting RANLIB to $RANLIB"
  383.  
  384.  
  385. for ac_prog in ar aal
  386. do
  387. if test -z "$AR"; then
  388.   # Extract the first word of `$ac_prog', so it can be a program name with args.
  389.   set ac_dummy $ac_prog; ac_word=$2
  390.   test -n "$silent" || echo "checking for $ac_word"
  391.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  392.   for ac_dir in $PATH; do
  393.     test -z "$ac_dir" && ac_dir=.
  394.     if test -f $ac_dir/$ac_word; then
  395.       AR="$ac_prog"
  396.       break
  397.     fi
  398.   done
  399.   IFS="$ac_save_ifs"
  400. fi
  401.  
  402. test -n "$AR" && test -n "$verbose" && echo "    setting AR to $AR"
  403.  
  404. test -n "$AR" && break
  405. done
  406. test -n "$AR" || AR="ar"
  407.  
  408.  
  409. # Install just never works :-(
  410. if test -z "$INSTALL"
  411. then INSTALL=cp
  412. fi
  413.  
  414. # Optimizer/debugger flags passed between Makefiles
  415. if test -z "$OPT"
  416. then OPT=-O
  417. fi
  418.  
  419. # checks for UNIX variants that set C preprocessor variables
  420. test -n "$silent" || echo "checking for AIX"
  421. test -n "$silent" || echo "checking how to run the C preprocessor"
  422. if test -z "$CPP"; then
  423.   # This must be in double quotes, not single quotes, because CPP may get
  424.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  425.   # make.  It must be expanded now.
  426.   CPP="${CC-cc} -E"
  427.   cat > conftest.${ac_ext} <<EOF
  428. #include "confdefs.h"
  429. #include <stdio.h>
  430. Syntax Error
  431. EOF
  432. # Some shells (Coherent) do redirections in the wrong order, so need
  433. # the parens.
  434. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  435. if test -z "$ac_err"; then
  436.   :
  437. else
  438.   rm -rf conftest*
  439.   CPP="${CC-cc} -E -traditional-cpp"
  440.   cat > conftest.${ac_ext} <<EOF
  441. #include "confdefs.h"
  442. #include <stdio.h>
  443. Syntax Error
  444. EOF
  445. # Some shells (Coherent) do redirections in the wrong order, so need
  446. # the parens.
  447. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  448. if test -z "$ac_err"; then
  449.   :
  450. else
  451.   rm -rf conftest*
  452.   CPP=/lib/cpp
  453. fi
  454. rm -f conftest*
  455. fi
  456. rm -f conftest*
  457. fi
  458. test -n "$verbose" && echo "    setting CPP to $CPP"
  459.  
  460. cat > conftest.${ac_ext} <<EOF
  461. #include "confdefs.h"
  462. #ifdef _AIX
  463.   yes
  464. #endif
  465.  
  466. EOF
  467. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  468. if egrep "yes" conftest.out >/dev/null 2>&1; then
  469.   rm -rf conftest*
  470.   
  471. {
  472. test -n "$verbose" && \
  473. echo "    defining _ALL_SOURCE"
  474. echo "#define" _ALL_SOURCE "1" >> confdefs.h
  475. DEFS="$DEFS -D_ALL_SOURCE=1"
  476. ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD}
  477. \${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD}
  478. \${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD}
  479. "
  480. }
  481.  
  482.  
  483. fi
  484. rm -f conftest*
  485.  
  486.  
  487. test -n "$silent" || echo "checking for POSIXized ISC"
  488. if test -d /etc/conf/kconfig.d &&
  489.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  490. then
  491.   ISC=1 # If later tests want to check for ISC.
  492.   
  493. {
  494. test -n "$verbose" && \
  495. echo "    defining _POSIX_SOURCE"
  496. echo "#define" _POSIX_SOURCE "1" >> confdefs.h
  497. DEFS="$DEFS -D_POSIX_SOURCE=1"
  498. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
  499. \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
  500. \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
  501. "
  502. }
  503.  
  504.   if test -n "$GCC"; then
  505.     CC="$CC -posix"
  506.   else
  507.     CC="$CC -Xp"
  508.   fi
  509. fi
  510.  
  511. test -n "$silent" || echo "checking for minix/config.h"
  512. cat > conftest.${ac_ext} <<EOF
  513. #include "confdefs.h"
  514. #include <minix/config.h>
  515. EOF
  516. # Some shells (Coherent) do redirections in the wrong order, so need
  517. # the parens.
  518. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  519. if test -z "$ac_err"; then
  520.   rm -rf conftest*
  521.   MINIX=1
  522.  
  523. fi
  524. rm -f conftest*
  525.  
  526. # The Minix shell can't assign to the same variable on the same line!
  527. if test -n "$MINIX"; then
  528.   
  529. {
  530. test -n "$verbose" && \
  531. echo "    defining _POSIX_SOURCE"
  532. echo "#define" _POSIX_SOURCE "1" >> confdefs.h
  533. DEFS="$DEFS -D_POSIX_SOURCE=1"
  534. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
  535. \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
  536. \${ac_eA}_POSIX_SOURCE\$r=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  537. if test -z "$ac_err"; then
  538.   rm -rf conftest*
  539.   
  540. {
  541. test -n "$verbose" && \
  542. echo "    defining ${ac_tr_hdr}"
  543. echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  544. DEFS="$DEFS -D${ac_tr_hdr}=1"
  545. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  546. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  547. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  548. "
  549. }
  550.  
  551.  
  552. fi
  553. rm -f conftest*
  554. done
  555.  
  556. test -n "$silent" || echo "checking for directory library header"
  557. ac_dir_header=
  558. if test -z "$ac_dir_header"; then
  559.   test -n "$silent" || echo "checking for dirent.h"
  560. cat > conftest.${ac_ext} <<EOF
  561. #include "confdefs.h"
  562. #include <sys/types.h>
  563. #include <dirent.h>
  564. int main() { return 0; }
  565. int t() { DIR *dirp = 0;; return 0; }
  566. EOF
  567. if eval $ac_compile; then
  568.   rm -rf conftest*
  569.   
  570. {
  571. test -n "$verbose" && \
  572. echo "    defining DIRENT"
  573. echo "#define" DIRENT "1" >> confdefs.h
  574. DEFS="$DEFS -DDIRENT=1"
  575. ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
  576. \${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
  577. \${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
  578. "
  579. }
  580.  ac_dir_header=dirent.h
  581.  
  582. fi
  583. rm -f conftest*
  584. fi
  585. if test -z "$ac_dir_header"; then
  586.   test -n "$silent" || echo "checking for sys/ndir.h"
  587. cat > conftest.${ac_ext} <<EOF
  588. #include "confdefs.h"
  589. #include <sys/types.h>
  590. #include <sys/ndir.h>
  591. int main() { return 0; }
  592. int t() { DIR *dirp = 0;; return 0; }
  593. EOF
  594. if eval $ac_compile; then
  595.   rm -rf conftest*
  596.   
  597. {
  598. test -n "$verbose" && \
  599. echo "    defining SYSNDIR"
  600. echo "#define" SYSNDIR "1" >> confdefs.h
  601. DEFS="$DEFS -DSYSNDIR=1"
  602. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
  603. \${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
  604. \${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
  605. "
  606. }
  607.  ac_dir_header=sys/ndir.h
  608.  
  609. fi
  610. rm -f conftest*
  611. fi
  612. if test -z "$ac_dir_header"; then
  613.   test -n "$silent" || echo "checking for sys/dir.h"
  614. cat > conftest.${ac_ext} <<EOF
  615. #include "confdefs.h"
  616. #include <sys/types.h>
  617. #include <sys/dir.h>
  618. int main() { return 0; }
  619. int t() { DIR *dirp = 0;; return 0; }
  620. EOF
  621. if eval $ac_compile; then
  622.   rm -rf conftest*
  623.   
  624. {
  625. test -n "$verbose" && \
  626. echo "    defining SYSDIR"
  627. echo "#define" SYSDIR "1" >> confdefs.h
  628. DEFS="$DEFS -DSYSDIR=1"
  629. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
  630. \${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
  631. \${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
  632. "
  633. }
  634.  ac_dir_header=sys/dir.h
  635.  
  636. fi
  637. rm -f conftest*
  638. fi
  639. if test -z "$ac_dir_header"; then
  640.   test -n "$silent" || echo "checking for ndir.h"
  641. cat > conftest.${ac_ext} <<EOF
  642. #include "confdefs.h"
  643. #include <sys/types.h>
  644. #include <ndir.h>
  645. int main() { return 0; }
  646. int t() { DIR *dirp = 0;; return 0; }
  647. EOF
  648. if eval $ac_compile; then
  649.   rm -rf conftest*
  650.   
  651. {
  652. test -n "$verbose" && \
  653. echo "    defining NDIR"
  654. echo "#define" NDIR "1" >> confdefs.h
  655. DEFS="$DEFS -DNDIR=1"
  656. ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
  657. \${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
  658. \${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
  659. "
  660. }
  661.  ac_dir_header=ndir.h
  662.  
  663. fi
  664. rm -f conftest*
  665. fi
  666.  
  667. test -n "$silent" || echo "checking for closedir return value"
  668. cat > conftest.${ac_ext} <<EOF
  669. #include "confdefs.h"
  670. #include <sys/types.h>
  671. #include <$ac_dir_header>
  672. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  673. EOF
  674. eval $ac_compile
  675. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  676.   :
  677. else
  678.   
  679. {
  680. test -n "$verbose" && \
  681. echo "    defining VOID_CLOSEDIR"
  682. echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
  683. DEFS="$DEFS -DVOID_CLOSEDIR=1"
  684. ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
  685. \${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
  686. \${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
  687. "
  688. }
  689.  
  690. fi
  691. rm -fr conftest*
  692.  
  693.  
  694. # checks for typedefs
  695. test -n "$silent" || echo "checking for clock_t in time.h"
  696. echo '#include "confdefs.h"
  697. #include <time.h>' > conftest.${ac_ext}
  698. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  699. if egrep "clock_t" conftest.out >/dev/null 2>&1; then
  700.   :
  701. else
  702.   rm -rf conftest*
  703.   
  704. {
  705. test -n "$verbose" && \
  706. echo "    defining" clock_t to be "long"
  707. echo "#define" clock_t "long" >> confdefs.h
  708. DEFS="$DEFS -Dclock_t=long"
  709. ac_sed_defs="${ac_sed_defs}\${ac_dA}clock_t\${ac_dB}clock_t\${ac_dC}long\${ac_dD}
  710. \${ac_uA}clock_t\${ac_uB}clock_t\${ac_uC}long\${ac_uD}
  711. \${ac_eA}clock_t\${ac_eB}clock_t\${ac_eC}long\${ac_eD}
  712. "
  713. }
  714.  
  715. fi
  716. rm -f conftest*
  717.  
  718. test -n "$silent" || echo "checking for mode_t in sys/types.h"
  719. echo '#include "confdefs.h"
  720. #include <sys/types.h>' > conftest.${ac_ext}
  721. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  722. if egrep "mode_t" conftest.out >/dev/null 2>&1; then
  723.   :
  724. else
  725.   rm -rf conftest*
  726.   
  727. {
  728. test -n "$verbose" && \
  729. echo "    defining" mode_t to be "int"
  730. echo "#define" mode_t "int" >> confdefs.h
  731. DEFS="$DEFS -Dmode_t=int"
  732. ac_sed_defs="${ac_sed_defs}\${ac_dA}mode_t\${ac_dB}mode_t\${ac_dC}int\${ac_dD}
  733. \${ac_uA}mode_t\${ac_uB}mode_t\${ac_uC}int\${ac_uD}
  734. \${ac_eA}mode_t\${ac_eB}mode_t\${ac_eC}int\${ac_eD}
  735. "
  736. }
  737.  
  738. fi
  739. rm -f conftest*
  740.  
  741. test -n "$silent" || echo "checking for off_t in sys/types.h"
  742. echo '#include "confdefs.h"
  743. #include <sys/types.h>' > conftest.${ac_ext}
  744. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  745. if egrep "off_t" conftest.out >/dev/null 2>&1; then
  746.   :
  747. else
  748.   rm -rf conftest*
  749.   
  750. {
  751. test -n "$verbose" && \
  752. echo "    defining" off_t to be "long"
  753. echo "#define" off_t "long" >> confdefs.h
  754. DEFS="$DEFS -Doff_t=long"
  755. ac_sed_defs="${ac_sed_defs}\${ac_dA}off_t\${ac_dB}off_t\${ac_dC}long\${ac_dD}
  756. \${ac_uA}off_t\${ac_uB}off_t\${ac_uC}long\${ac_uD}
  757. \${ac_eA}off_t\${ac_eB}off_t\${ac_eC}long\${ac_eD}
  758. "
  759. }
  760.  
  761. fi
  762. rm -f conftest*
  763.  
  764. test -n "$silent" || echo "checking for pid_t in sys/types.h"
  765. echo '#include "confdefs.h"
  766. #include <sys/types.h>' > conftest.${ac_ext}
  767. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  768. if egrep "pid_t" conftest.out >/dev/null 2>&1; then
  769.   :
  770. else
  771.   rm -rf conftest*
  772.   
  773. {
  774. test -n "$verbose" && \
  775. echo "    defining" pid_t to be "int"
  776. echo "#define" pid_t "int" >> confdefs.h
  777. DEFS="$DEFS -Dpid_t=int"
  778. ac_sed_defs="${ac_sed_defs}\${ac_dA}pid_t\${ac_dB}pid_t\${ac_dC}int\${ac_dD}
  779. \${ac_uA}pid_t\${ac_uB}pid_t\${ac_uC}int\${ac_uD}
  780. \${ac_eA}pid_t\${ac_eB}pid_t\${ac_eC}int\${ac_eD}
  781. "
  782. }
  783.  
  784. fi
  785. rm -f conftest*
  786.  
  787. test -n "$silent" || echo "checking for return type of signal handlers"
  788. cat > conftest.${ac_ext} <<EOF
  789. #include "confdefs.h"
  790. #include <sys/types.h>
  791. #include <signal.h>
  792. #ifdef signal
  793. #undef signal
  794. #endif
  795. extern void (*signal ()) ();
  796. int main() { return 0; }
  797. int t() { int i;; return 0; }
  798. EOF
  799. if eval $ac_compile; then
  800.   rm -rf conftest*
  801.   
  802. {
  803. test -n "$verbose" && \
  804. echo "    defining" RETSIGTYPE to be "void"
  805. echo "#define" RETSIGTYPE "void" >> confdefs.h
  806. DEFS="$DEFS -DRETSIGTYPE=void"
  807. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
  808. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
  809. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
  810. "
  811. }
  812.  
  813.  
  814. else
  815.   rm -rf conftest*
  816.   
  817. {
  818. test -n "$verbose" && \
  819. echo "    defining" RETSIGTYPE to be "int"
  820. echo "#define" RETSIGTYPE "int" >> confdefs.h
  821. DEFS="$DEFS -DRETSIGTYPE=int"
  822. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
  823. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
  824. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
  825. "
  826. }
  827.  
  828. fi
  829. rm -f conftest*
  830.  
  831.  
  832. test -n "$silent" || echo "checking for size_t in sys/types.h"
  833. echo '#include "confdefs.h"
  834. #include <sys/types.h>' > conftest.${ac_ext}
  835. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  836. if egrep "size_t" conftest.out >/dev/null 2>&1; then
  837.   :
  838. else
  839.   rm -rf conftest*
  840.   
  841. {
  842. test -n "$verbose" && \
  843. echo "    defining" size_t to be "unsigned"
  844. echo "#define" size_t "unsigned" >> confdefs.h
  845. DEFS="$DEFS -Dsize_t=unsigned"
  846. ac_sed_defs="${ac_sed_defs}\${ac_dA}size_t\${ac_dB}size_t\${ac_dC}unsigned\${ac_dD}
  847. \${ac_uA}size_t\${ac_uB}size_t\${ac_uC}unsigned\${ac_uD}
  848. \${ac_eA}size_t\${ac_eB}size_t\${ac_eC}unsigned\${ac_eD}
  849. "
  850. }
  851.  
  852. fi
  853. rm -f conftest*
  854.  
  855. test -n "$silent" || echo "checking for uid_t in sys/types.h"
  856. echo '#include "confdefs.h"
  857. #include <sys/types.h>' > conftest.${ac_ext}
  858. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  859. if egrep "uid_t" conftest.out >/dev/null 2>&1; then
  860.   :
  861. else
  862.   rm -rf conftest*
  863.   
  864. {
  865. test -n "$verbose" && \
  866. echo "    defining" uid_t to be "int"
  867. echo "#define" uid_t "int" >> confdefs.h
  868. DEFS="$DEFS -Duid_t=int"
  869. ac_sed_defs="${ac_sed_defs}\${ac_dA}uid_t\${ac_dB}uid_t\${ac_dC}int\${ac_dD}
  870. \${ac_uA}uid_t\${ac_uB}uid_t\${ac_uC}int\${ac_uD}
  871. \${ac_eA}uid_t\${ac_eB}uid_t\${ac_eC}int\${ac_eD}
  872. "
  873. }
  874.  
  875. {
  876. test -n "$verbose" && \
  877. echo "    defining" gid_t to be "int"
  878. echo "#define" gid_t "int" >> confdefs.h
  879. DEFS="$DEFS -Dgid_t=int"
  880. ac_sed_defs="${ac_sed_defs}\${ac_dA}gid_t\${ac_dB}gid_t\${ac_dC}int\${ac_dD}
  881. \${ac_uA}gid_t\${ac_uB}gid_t\${ac_uC}int\${ac_uD}
  882. \${ac_eA}gid_t\${ac_eB}gid_t\${ac_eC}int\${ac_eD}
  883. "
  884. }
  885.  
  886. fi
  887. rm -f conftest*
  888.  
  889.  
  890. # Set name for machine-dependent library files
  891.  
  892. if test -z "$MACHDEP"
  893. then
  894.     ac_system=`uname -s | tr '[A-Z]' '[a-z]'`
  895.     ac_release=`uname -r | sed 's/\..*//'`
  896.     MACHDEP="$ac_system$ac_release"
  897.     case MACHDEP in
  898.     '')    MACHDEP=unknown;;
  899.     esac
  900.     test -n "$verbose" && echo "    setting MACHDEP to '$MACHDEP'"
  901. fi
  902.  
  903. # Set info about shared libraries.
  904. # XXX This should try things out instead of testing uname!
  905.  
  906.  
  907.  
  908.  
  909. ac_system=`uname -s`
  910. ac_release=`uname -r`
  911. # SO is the extension of shared libraries `(including the dot!)
  912. # -- usually .so, .sl on HP-UX
  913. if test -z "$SO"
  914. then
  915.     case $ac_system in
  916.     hp*|HP*) SO=.sl;;
  917.     *)    SO=.so;;
  918.     esac
  919.     test -n "$verbose" && echo "    setting SO to '$SO'"
  920. fi
  921. # LDSHARED is the ld *command* used to create shared library
  922. # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
  923. if test -z "$LDSHARED"
  924. then
  925.     case $ac_system/$ac_release in
  926.     IRIX*) LDSHARED="ld -shared";;
  927.     SunOS/4*) LDSHARED="ld";;
  928.     SunOS/5*) LDSHARED="ld -G";;
  929.     hp*|HP*) LDSHARED="ld -b";;
  930.     *)    LDSHARED="ld";;
  931.     esac
  932.     test -n "$verbose" && echo "    setting LDSHARED= to '$LDSHARED'"
  933. fi
  934. # CCSHARED are the C *flags* used to create objects to go into a shared
  935. # library -- this is only needed for HP-UX
  936. if test -z "$CCSHARED"
  937. then
  938.     case $ac_system in
  939.     hp*|HP*) CCSHARED="+z";;
  940.     esac
  941.     test -n "$verbose" && echo "    setting CCSHARED= to '$CCSHARED'"
  942. fi
  943. # LINKFORSHARED are the flags passed to the $(CC) command that links
  944. # the python executable -- this is only needed for HP-UX
  945. if test -z "$LINKFORSHARED"
  946. then
  947.     case $ac_system in
  948.     hp*|HP*) LINKFORSHARED="-Wl,-E";;
  949.     esac
  950.     test -n "$verbose" && echo "    setting LINKFORSHARED to '$LINKFORSHARED'"
  951. fi
  952.  
  953. # checks for libraries
  954. ac_save_LIBS="${LIBS}"
  955. LIBS="${LIBS} -ldl"
  956. ac_have_lib=""
  957. test -n "$silent" || echo "checking for -ldl"
  958. cat > conftest.${ac_ext} <<EOF
  959. #include "confdefs.h"
  960.  
  961. int main() { return 0; }
  962. int t() { main();; return 0; }
  963. EOF
  964. if eval $ac_compile; then
  965.   rm -rf conftest*
  966.   ac_have_lib="1"
  967.  
  968. fi
  969. rm -f conftest*
  970. LIBS="${ac_save_LIBS}"
  971. if test -n "${ac_have_lib}"; then
  972.    
  973. {
  974. test -n "$verbose" && \
  975. echo "    defining HAVE_LIBDL"
  976. echo "#define" HAVE_LIBDL "1" >> confdefs.h
  977. DEFS="$DEFS -DHAVE_LIBDL=1"
  978. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBDL\${ac_dB}HAVE_LIBDL\${ac_dC}1\${ac_dD}
  979. \${ac_uA}HAVE_LIBDL\${ac_uB}HAVE_LIBDL\${ac_uC}1\${ac_uD}
  980. \${ac_eA}HAVE_LIBDL\${ac_eB}HAVE_LIBDL\${ac_eC}1\${ac_eD}
  981. "
  982. }
  983.  
  984.    LIBS="${LIBS} -ldl"
  985. fi
  986.  
  987.  
  988. test -n "$silent" || echo "checking for --with-svr4"
  989. # check whether --with-svr4 or --without-svr4 was given.
  990. withval="$with_svr4"
  991. if test -n "$withval"; then
  992.   
  993. ac_save_LIBS="${LIBS}"
  994. LIBS="${LIBS} -lsocket"
  995. ac_have_lib=""
  996. test -n "$silent" || echo "checking for -lsocket"
  997. cat > conftest.${ac_ext} <<EOF
  998. #include "confdefs.h"
  999.  
  1000. int main() { return 0; }
  1001. int t() { main();; return 0; }
  1002. EOF
  1003. if eval $ac_compile; then
  1004.   rm -rf conftest*
  1005.   ac_have_lib="1"
  1006.  
  1007. fi
  1008. rm -f conftest*
  1009. LIBS="${ac_save_LIBS}"
  1010. if test -n "${ac_have_lib}"; then
  1011.    
  1012. {
  1013. test -n "$verbose" && \
  1014. echo "    defining HAVE_LIBSOCKET"
  1015. echo "#define" HAVE_LIBSOCKET "1" >> confdefs.h
  1016. DEFS="$DEFS -DHAVE_LIBSOCKET=1"
  1017. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBSOCKET\${ac_dB}HAVE_LIBSOCKET\${ac_dC}1\${ac_dD}
  1018. \${ac_uA}HAVE_LIBSOCKET\${ac_uB}HAVE_LIBSOCKET\${ac_uC}1\${ac_uD}
  1019. \${ac_eA}HAVE_LIBSOCKET\${ac_eB}HAVE_LIBSOCKET\${ac_eC}1\${ac_eD}
  1020. "
  1021. }
  1022.  
  1023.    LIBS="${LIBS} -lsocket"
  1024. fi
  1025.  
  1026. ac_save_LIBS="${LIBS}"
  1027. LIBS="${LIBS} -linet"
  1028. ac_have_lib=""
  1029. test -n "$silent" || echo "checking for -linet"
  1030. cat > conftest.${ac_ext} <<EOF
  1031. #include "confdefs.h"
  1032.  
  1033. int main() { return 0; }
  1034. int t() { main();; return 0; }
  1035. EOF
  1036. if eval $ac_compile; then
  1037.   rm -rf conftest*
  1038.   ac_have_lib="1"
  1039.  
  1040. fi
  1041. rm -f conftest*
  1042. LIBS="${ac_save_LIBS}"
  1043. if test -n "${ac_have_lib}"; then
  1044.    
  1045. {
  1046. test -n "$verbose" && \
  1047. echo "    defining HAVE_LIBINET"
  1048. echo "#define" HAVE_LIBINET "1" >> confdefs.h
  1049. DEFS="$DEFS -DHAVE_LIBINET=1"
  1050. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBINET\${ac_dB}HAVE_LIBINET\${ac_dC}1\${ac_dD}
  1051. \${ac_uA}HAVE_LIBINET\${ac_uB}HAVE_LIBINET\${ac_uC}1\${ac_uD}
  1052. \${ac_eA}HAVE_LIBINET\${ac_eB}HAVE_LIBINET\${ac_eC}1\${ac_eD}
  1053. "
  1054. }
  1055.  
  1056.    LIBS="${LIBS} -linet"
  1057. fi
  1058.  
  1059. ac_save_LIBS="${LIBS}"
  1060. LIBS="${LIBS} -lnsl"
  1061. ac_have_lib=""
  1062. test -n "$silent" || echo "checking for -lnsl"
  1063. cat > conftest.${ac_ext} <<EOF
  1064. #include "confdefs.h"
  1065.  
  1066. int main() { return 0; }
  1067. int t() { main();; return 0; }
  1068. EOF
  1069. if eval $ac_compile; then
  1070.   rm -rf conftest*
  1071.   ac_have_lib="1"
  1072.  
  1073. fi
  1074. rm -f conftest*
  1075. LIBS="${ac_save_LIBS}"
  1076. if test -n "${ac_have_lib}"; then
  1077.    
  1078. {
  1079. test -n "$verbose" && \
  1080. echo "    defining HAVE_LIBNSL"
  1081. echo "#define" HAVE_LIBNSL "1" >> confdefs.h
  1082. DEFS="$DEFS -DHAVE_LIBNSL=1"
  1083. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBNSL\${ac_dB}HAVE_LIBNSL\${ac_dC}1\${ac_dD}
  1084. \${ac_uA}HAVE_LIBNSL\${ac_uB}HAVE_LIBNSL\${ac_uC}1\${ac_uD}
  1085. \${ac_eA}HAVE_LIBNSL\${ac_eB}HAVE_LIBNSL\${ac_eC}1\${ac_eD}
  1086. "
  1087. }
  1088.  
  1089.    LIBS="${LIBS} -lnsl"
  1090. fi
  1091.  
  1092.  
  1093. fi
  1094.  
  1095.  
  1096. test -n "$silent" || echo "checking for --with-readline"
  1097. # check whether --with-readline or --without-readline was given.
  1098. withval="$with_readline"
  1099. if test -n "$withval"; then
  1100.   
  1101. {
  1102. test -n "$verbose" && \
  1103. echo "    defining WITH_READLINE"
  1104. echo "#define" WITH_READLINE "1" >> confdefs.h
  1105. DEFS="$DEFS -DWITH_READLINE=1"
  1106. ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_READLINE\${ac_dB}WITH_READLINE\${ac_dC}1\${ac_dD}
  1107. \${ac_uA}WITH_READLINE\${ac_uB}WITH_READLINE\${ac_uC}1\${ac_uD}
  1108. \${ac_eA}WITH_READLINE\${ac_eB}WITH_READLINE\${ac_eC}1\${ac_eD}
  1109. "
  1110. }
  1111.  
  1112. if test ! -d "$withval"
  1113. then echo "configure: proper usage is --with-readline=DIRECTORY" >&2; exit 1
  1114. fi
  1115. termcap=
  1116. ac_save_LIBS="${LIBS}"
  1117. LIBS="${LIBS} -ltermcap"
  1118. ac_have_lib=""
  1119. test -n "$silent" || echo "checking for -ltermcap"
  1120. cat > conftest.${ac_ext} <<EOF
  1121. #include "confdefs.h"
  1122.  
  1123. int main() { return 0; }
  1124. int t() { main();; return 0; }
  1125. EOF
  1126. if eval $ac_compile; then
  1127.   rm -rf conftest*
  1128.   ac_have_lib="1"
  1129.  
  1130. fi
  1131. rm -f conftest*
  1132. LIBS="${ac_save_LIBS}"
  1133. if test -n "${ac_have_lib}"; then
  1134.    :; termcap=termcap
  1135. else
  1136.    :; ac_save_LIBS="${LIBS}"
  1137. LIBS="${LIBS} -ltermlib"
  1138. ac_have_lib=""
  1139. test -n "$silent" || echo "checking for -ltermlib"
  1140. cat > conftest.${ac_ext} <<EOF
  1141. #include "confdefs.h"
  1142.  
  1143. int main() { return 0; }
  1144. int t() { main();; return 0; }
  1145. EOF
  1146. if eval $ac_compile; then
  1147.   rm -rf conftest*
  1148.   ac_have_lib="1"
  1149.  
  1150. fi
  1151. rm -f conftest*
  1152. LIBS="${ac_save_LIBS}"
  1153. if test -n "${ac_have_lib}"; then
  1154.    :; termcap=termlib
  1155. else
  1156.    :; 
  1157. fi
  1158.  
  1159. fi
  1160.  
  1161. if test ! -z "$termcap"
  1162. then LIBS="$LIBS $withval/libreadline.a"
  1163.      # Avoid possible conflict between shared libraries termcap and gl
  1164.      # on IRIX 5: both contain a routine called clear.
  1165.      if test -f /usr/lib/lib$termcap.a
  1166.      then LIBS="$LIBS /usr/lib/lib$termcap.a"
  1167.      else LIBS="$LIBS -l$termcap"
  1168.      fi
  1169. else echo "configure: no working termcap/termlib" >&2; exit 1
  1170. fi
  1171. fi
  1172.  
  1173.  
  1174. test -n "$silent" || echo "checking for --with-thread"
  1175. # check whether --with-thread or --without-thread was given.
  1176. withval="$with_thread"
  1177. if test -n "$withval"; then
  1178.   
  1179. if test -d "$withval"
  1180. then LIBS="$LIBS -L$withval"
  1181. fi
  1182. ac_save_LIBS="${LIBS}"
  1183. LIBS="${LIBS} -lpthreads"
  1184. ac_have_lib=""
  1185. test -n "$silent" || echo "checking for -lpthreads"
  1186. cat > conftest.${ac_ext} <<EOF
  1187. #include "confdefs.h"
  1188.  
  1189. int main() { return 0; }
  1190. int t() { main();; return 0; }
  1191. EOF
  1192. if eval $ac_compile; then
  1193.   rm -rf conftest*
  1194.   ac_have_lib="1"
  1195.  
  1196. fi
  1197. rm -f conftest*
  1198. LIBS="${ac_save_LIBS}"
  1199. if test -n "${ac_have_lib}"; then
  1200.    :; 
  1201. {
  1202. test -n "$verbose" && \
  1203. echo "    defining WITH_THREAD"
  1204. echo "#define" WITH_THREAD "1" >> confdefs.h
  1205. DEFS="$DEFS -DWITH_THREAD=1"
  1206. ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
  1207. \${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
  1208. \${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
  1209. "
  1210. }
  1211.  
  1212.  
  1213. {
  1214. test -n "$verbose" && \
  1215. echo "    defining _POSIX_THREADS"
  1216. echo "#define" _POSIX_THREADS "1" >> confdefs.h
  1217. DEFS="$DEFS -D_POSIX_THREADS=1"
  1218. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_THREADS\${ac_dB}_POSIX_THREADS\${ac_dC}1\${ac_dD}
  1219. \${ac_uA}_POSIX_THREADS\${ac_uB}_POSIX_THREADS\${ac_uC}1\${ac_uD}
  1220. \${ac_eA}_POSIX_THREADS\${ac_eB}_POSIX_THREADS\${ac_eC}1\${ac_eD}
  1221. "
  1222. }
  1223.  
  1224. LIBS="$LIBS -lpthreads"
  1225. LIBOBJS="$LIBOBJS thread.o"
  1226. else
  1227.    :; 
  1228. fi
  1229.  
  1230. ac_save_LIBS="${LIBS}"
  1231. LIBS="${LIBS} -lmpc"
  1232. ac_have_lib=""
  1233. test -n "$silent" || echo "checking for -lmpc"
  1234. cat > conftest.${ac_ext} <<EOF
  1235. #include "confdefs.h"
  1236.  
  1237. int main() { return 0; }
  1238. int t() { main();; return 0; }
  1239. EOF
  1240. if eval $ac_compile; then
  1241.   rm -rf conftest*
  1242.   ac_have_lib="1"
  1243.  
  1244. fi
  1245. rm -f conftest*
  1246. LIBS="${ac_save_LIBS}"
  1247. if test -n "${ac_have_lib}"; then
  1248.    :; 
  1249. {
  1250. test -n "$verbose" && \
  1251. echo "    defining WITH_THREAD"
  1252. echo "#define" WITH_THREAD "1" >> confdefs.h
  1253. DEFS="$DEFS -DWITH_THREAD=1"
  1254. ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
  1255. \${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
  1256. \${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
  1257. "
  1258. }
  1259.  
  1260. LIBS="$LIBS -lmpc"
  1261. LIBOBJS="$LIBOBJS thread.o"
  1262. else
  1263.    :; 
  1264. fi
  1265.  
  1266. ac_save_LIBS="${LIBS}"
  1267. LIBS="${LIBS} -lthread"
  1268. ac_have_lib=""
  1269. test -n "$silent" || echo "checking for -lthread"
  1270. cat > conftest.${ac_ext} <<EOF
  1271. #include "confdefs.h"
  1272.  
  1273. int main() { return 0; }
  1274. int t() { main();; return 0; }
  1275. EOF
  1276. if eval $ac_compile; then
  1277.   rm -rf conftest*
  1278.   ac_have_lib="1"
  1279.  
  1280. fi
  1281. rm -f conftest*
  1282. LIBS="${ac_save_LIBS}"
  1283. if test -n "${ac_have_lib}"; then
  1284.    :; 
  1285. {
  1286. test -n "$verbose" && \
  1287. echo "    defining WITH_THREAD"
  1288. echo "#define" WITH_THREAD "1" >> confdefs.h
  1289. DEFS="$DEFS -DWITH_THREAD=1"
  1290. ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
  1291. \${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
  1292. \${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
  1293. "
  1294. }
  1295.  
  1296. LIBS="$LIBS -lthread"
  1297. LIBOBJS="$LIBOBJS thread.o"
  1298. else
  1299.    :; 
  1300. fi
  1301.  
  1302.  
  1303. fi
  1304.  
  1305.  
  1306. # -I${DLINCLDIR} is added to the compile rule for import.o
  1307.  
  1308. DLINCLDIR=/
  1309.  
  1310. test -n "$silent" || echo "checking for --with-sgi-dl"
  1311. # check whether --with-sgi-dl or --without-sgi-dl was given.
  1312. withval="$with_sgi_dl"
  1313. if test -n "$withval"; then
  1314.   
  1315. {
  1316. test -n "$verbose" && \
  1317. echo "    defining WITH_SGI_DL"
  1318. echo "#define" WITH_SGI_DL "1" >> confdefs.h
  1319. DEFS="$DEFS -DWITH_SGI_DL=1"
  1320. ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_SGI_DL\${ac_dB}WITH_SGI_DL\${ac_dC}1\${ac_dD}
  1321. \${ac_uA}WITH_SGI_DL\${ac_uB}WITH_SGI_DL\${ac_uC}1\${ac_uD}
  1322. \${ac_eA}WITH_SGI_DL\${ac_eB}WITH_SGI_DL\${ac_eC}1\${ac_eD}
  1323. "
  1324. }
  1325.  
  1326. dldir=$withval
  1327. if test -d "$dldir"
  1328. then LIBS="$LIBS -L$dldir"
  1329. else echo "configure: proper usage is --with-sgi-dl=DIRECTORY" >&2; exit 1
  1330. fi
  1331. DLINCLDIR=${dldir}
  1332. LIBS="$LIBS -ldl -lmld"
  1333. fi
  1334.  
  1335.  
  1336. test -n "$silent" || echo "checking for --with-dl-dld"
  1337. # check whether --with-dl-dld or --without-dl-dld was given.
  1338. withval="$with_dl_dld"
  1339. if test -n "$withval"; then
  1340.   
  1341. {
  1342. test -n "$verbose" && \
  1343. echo "    defining WITH_DL_DLD"
  1344. echo "#define" WITH_DL_DLD "1" >> confdefs.h
  1345. DEFS="$DEFS -DWITH_DL_DLD=1"
  1346. ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_DL_DLD\${ac_dB}WITH_DL_DLD\${ac_dC}1\${ac_dD}
  1347. \${ac_uA}WITH_DL_DLD\${ac_uB}WITH_DL_DLD\${ac_uC}1\${ac_uD}
  1348. \${ac_eA}WITH_DL_DLD\${ac_eB}WITH_DL_DLD\${ac_eC}1\${ac_eD}
  1349. "
  1350. }
  1351.  
  1352. dldir=`echo "$withval" | sed 's/,.*//'`
  1353. dlddir=`echo "$withval" | sed 's/.*,//'`
  1354. if test -d "$dldir" -a -d "$dlddir"
  1355. then LIBS="$LIBS -L$dldir -L$dlddir"
  1356. else echo "configure: proper usage is --with-dl-dld=DL_DIRECTORY" >&2; exit 1
  1357. fi
  1358. DLINCLDIR=${dldir}
  1359. LIBS="$LIBS -ldl -ldld"
  1360. fi
  1361.  
  1362.  
  1363. # checks for library functions
  1364. for ac_func in chown clock dlopen ftime gettimeofday getpeername getpgrp getpid getwd link lstat nice readlink select setgid setuid setsid setpgid setpgrp setvbuf siginterrupt symlink tcgetpgrp tcsetpgrp times uname waitpid
  1365. do
  1366. ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1367. test -n "$silent" || echo "checking for ${ac_func}"
  1368. cat > conftest.${ac_ext} <<EOF
  1369. #include "confdefs.h"
  1370. #include <ctype.h>
  1371. int main() { return 0; }
  1372. int t() { 
  1373. /* The GNU C library defines this for functions which it implements
  1374.     to always fail with ENOSYS.  Some functions are actually named
  1375.     something starting with __ and the normal name is an alias.  */
  1376. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  1377. choke me
  1378. #else
  1379. /* Override any gcc2 internal prototype to avoid an error.  */
  1380. extern char ${ac_func}(); ${ac_func}();
  1381. #endif
  1382. ; return 0; }
  1383. EOF
  1384. if eval $ac_compile; then
  1385.   rm -rf conftest*
  1386.   {
  1387. test -n "$verbose" && \
  1388. echo "    defining ${ac_tr_func}"
  1389. echo "#define" ${ac_tr_func} "1" >> confdefs.h
  1390. DEFS="$DEFS -D${ac_tr_func}=1"
  1391. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  1392. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  1393. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  1394. "
  1395. }
  1396.  
  1397.  
  1398. fi
  1399. rm -f conftest*
  1400. done
  1401.  
  1402. for ac_func in dup2 getcwd strerror memmove
  1403. do
  1404. test -n "$silent" || echo "checking for ${ac_func}"
  1405. cat > conftest.${ac_ext} <<EOF
  1406. #include "confdefs.h"
  1407. #include <ctype.h>
  1408. int main() { return 0; }
  1409. int t() { 
  1410. /* The GNU C library defines this for functions which it implements
  1411.     to always fail with ENOSYS.  Some functions are actually named
  1412.     something starting with __ and the normal name is an alias.  */
  1413. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  1414. choke me
  1415. #else
  1416. /* Override any gcc2 internal prototype to avoid an error.  */
  1417. extern char ${ac_func}(); ${ac_func}();
  1418. #endif
  1419. ; return 0; }
  1420. EOF
  1421. if eval $ac_compile; then
  1422.   :
  1423. else
  1424.   rm -rf conftest*
  1425.   LIBOBJS="$LIBOBJS ${ac_func}.o"
  1426. test -n "$verbose" && echo "    using ${ac_func}.o instead"
  1427. fi
  1428. rm -f conftest*
  1429.  
  1430. done
  1431.  
  1432. test -n "$silent" || echo "checking for getpgrp"
  1433. cat > conftest.${ac_ext} <<EOF
  1434. #include "confdefs.h"
  1435. #include <ctype.h>
  1436. int main() { return 0; }
  1437. int t() { 
  1438. /* The GNU C library defines this for functions which it implements
  1439.     to always fail with ENOSYS.  Some functions are actually named
  1440.     something starting with __ and the normal name is an alias.  */
  1441. #if defined (__stub_getpgrp) || defined (__stub___getpgrp)
  1442. choke me
  1443. #else
  1444. /* Override any gcc2 internal prototype to avoid an error.  */
  1445. extern char getpgrp(); getpgrp();
  1446. #endif
  1447. ; return 0; }
  1448. EOF
  1449. if eval $ac_compile; then
  1450.   rm -rf conftest*
  1451.   test -n "$silent" || echo "checking for argument to getpgrp"
  1452. cat > conftest.${ac_ext} <<EOF
  1453. #include "confdefs.h"
  1454. #include <unistd.h>
  1455. int main() { return 0; }
  1456. int t() { getpgrp(0);; return 0; }
  1457. EOF
  1458. if eval $ac_compile; then
  1459.   rm -rf conftest*
  1460.   
  1461. {
  1462. test -n "$verbose" && \
  1463. echo "    defining GETPGRP_HAVE_ARG"
  1464. echo "#define" GETPGRP_HAVE_ARG "1" >> confdefs.h
  1465. DEFS="$DEFS -DGETPGRP_HAVE_ARG=1"
  1466. ac_sed_defs="${ac_sed_defs}\${ac_dA}GETPGRP_HAVE_ARG\${ac_dB}GETPGRP_HAVE_ARG\${ac_dC}1\${ac_dD}
  1467. \${ac_uA}GETPGRP_HAVE_ARG\${ac_uB}GETPGRP_HAVE_ARG\${ac_uC}1\${ac_uD}
  1468. \${ac_eA}GETPGRP_HAVE_ARG\${ac_eB}GETPGRP_HAVE_ARG\${ac_eC}1\${ac_eD}
  1469. "
  1470. }
  1471.  
  1472.  
  1473. fi
  1474. rm -f conftest*
  1475.  
  1476.  
  1477. fi
  1478. rm -f conftest*
  1479.  
  1480.  
  1481. # checks for structures
  1482. test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included"
  1483. cat > conftest.${ac_ext} <<EOF
  1484. #include "confdefs.h"
  1485. #include <sys/types.h>
  1486. #include <sys/time.h>
  1487. #include <time.h>
  1488. int main() { return 0; }
  1489. int t() { struct tm *tp;; return 0; }
  1490. EOF
  1491. if eval $ac_compile; then
  1492.   rm -rf conftest*
  1493.   
  1494. {
  1495. test -n "$verbose" && \
  1496. echo "    defining TIME_WITH_SYS_TIME"
  1497. echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
  1498. DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
  1499. ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
  1500. \${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
  1501. \${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
  1502. "
  1503. }
  1504.  
  1505.  
  1506. fi
  1507. rm -f conftest*
  1508.  
  1509. test -n "$silent" || echo "checking for struct tm in time.h"
  1510. cat > conftest.${ac_ext} <<EOF
  1511. #include "confdefs.h"
  1512. #include <sys/types.h>
  1513. #include <time.h>
  1514. int main() { return 0; }
  1515. int t() { struct tm *tp; tp->tm_sec;; return 0; }
  1516. EOF
  1517. if eval $ac_compile; then
  1518.   :
  1519. else
  1520.   rm -rf conftest*
  1521.   
  1522. {
  1523. test -n "$verbose" && \
  1524. echo "    defining TM_IN_SYS_TIME"
  1525. echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h
  1526. DEFS="$DEFS -DTM_IN_SYS_TIME=1"
  1527. ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD}
  1528. \${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD}
  1529. \${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD}
  1530. "
  1531. }
  1532.  
  1533. fi
  1534. rm -f conftest*
  1535.  
  1536. ac_decl='#include <sys/types.h>
  1537. '
  1538. case "$DEFS" in
  1539.   *TM_IN_SYS_TIME*) ac_decl="$ac_decl
  1540. #include <sys/time.h>
  1541. " ;;
  1542.   *) ac_decl="$ac_decl
  1543. #include <time.h>
  1544. " ;;
  1545. esac
  1546. test -n "$silent" || echo "checking for tm_zone in struct tm"
  1547. cat > conftest.${ac_ext} <<EOF
  1548. #include "confdefs.h"
  1549. $ac_decl
  1550. int main() { return 0; }
  1551. int t() { struct tm tm; tm.tm_zone;; return 0; }
  1552. EOF
  1553. if eval $ac_compile; then
  1554.   rm -rf conftest*
  1555.   
  1556. {
  1557. test -n "$verbose" && \
  1558. echo "    defining HAVE_TM_ZONE"
  1559. echo "#define" HAVE_TM_ZONE "1" >> confdefs.h
  1560. DEFS="$DEFS -DHAVE_TM_ZONE=1"
  1561. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TM_ZONE\${ac_dB}HAVE_TM_ZONE\${ac_dC}1\${ac_dD}
  1562. \${ac_uA}HAVE_TM_ZONE\${ac_uB}HAVE_TM_ZONE\${ac_uC}1\${ac_uD}
  1563. \${ac_eA}HAVE_TM_ZONE\${ac_eB}HAVE_TM_ZONE\${ac_eC}1\${ac_eD}
  1564. "
  1565. }
  1566.  
  1567.  
  1568. else
  1569.   rm -rf conftest*
  1570.   ac_no_tm_zone=1
  1571. fi
  1572. rm -f conftest*
  1573.  
  1574. if test -n "$ac_no_tm_zone"; then
  1575. test -n "$silent" || echo "checking for tzname"
  1576. cat > conftest.${ac_ext} <<EOF
  1577. #include "confdefs.h"
  1578. #include <time.h>
  1579. #ifndef tzname /* For SGI.  */
  1580. extern char *tzname[]; /* RS6000 and others want it this way.  */
  1581. #endif
  1582. int main() { return 0; }
  1583. int t() { atoi(*tzname);; return 0; }
  1584. EOF
  1585. if eval $ac_compile; then
  1586.   rm -rf conftest*
  1587.   
  1588. {
  1589. test -n "$verbose" && \
  1590. echo "    defining HAVE_TZNAME"
  1591. echo "#define" HAVE_TZNAME "1" >> confdefs.h
  1592. DEFS="$DEFS -DHAVE_TZNAME=1"
  1593. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TZNAME\${ac_dB}HAVE_TZNAME\${ac_dC}1\${ac_dD}
  1594. \${ac_uA}HAVE_TZNAME\${ac_uB}HAVE_TZNAME\${ac_uC}1\${ac_uD}
  1595. \${ac_eA}HAVE_TZNAME\${ac_eB}HAVE_TZNAME\${ac_eC}1\${ac_eD}
  1596. "
  1597. }
  1598.  
  1599.  
  1600. fi
  1601. rm -f conftest*
  1602.  
  1603. fi
  1604.  
  1605. test -n "$silent" || echo "checking for whether we have altzone"
  1606. cat > conftest.${ac_ext} <<EOF
  1607. #include "confdefs.h"
  1608. #include <time.h>
  1609. int main() { return 0; }
  1610. int t() { return altzone;; return 0; }
  1611. EOF
  1612. if eval $ac_compile; then
  1613.   rm -rf conftest*
  1614.   
  1615. {
  1616. test -n "$verbose" && \
  1617. echo "    defining HAVE_ALTZONE"
  1618. echo "#define" HAVE_ALTZONE "1" >> confdefs.h
  1619. DEFS="$DEFS -DHAVE_ALTZONE=1"
  1620. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALTZONE\${ac_dB}HAVE_ALTZONE\${ac_dC}1\${ac_dD}
  1621. \${ac_uA}HAVE_ALTZONE\${ac_uB}HAVE_ALTZONE\${ac_uC}1\${ac_uD}
  1622. \${ac_eA}HAVE_ALTZONE\${ac_eB}HAVE_ALTZONE\${ac_eC}1\${ac_eD}
  1623. "
  1624. }
  1625.  
  1626.  
  1627. fi
  1628. rm -f conftest*
  1629.  
  1630. test -n "$silent" || echo "checking for whether sys/select.h and sys/time.h may both be included"
  1631. cat > conftest.${ac_ext} <<EOF
  1632. #include "confdefs.h"
  1633.  
  1634. #include <sys/types.h>
  1635. #include <sys/select.h>
  1636. #include <sys/time.h>
  1637.  
  1638. int main() { return 0; }
  1639. int t() { ;; return 0; }
  1640. EOF
  1641. if eval $ac_compile; then
  1642.   rm -rf conftest*
  1643.   
  1644. {
  1645. test -n "$verbose" && \
  1646. echo "    defining SYS_SELECT_WITH_SYS_TIME"
  1647. echo "#define" SYS_SELECT_WITH_SYS_TIME "1" >> confdefs.h
  1648. DEFS="$DEFS -DSYS_SELECT_WITH_SYS_TIME=1"
  1649. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYS_SELECT_WITH_SYS_TIME\${ac_dB}SYS_SELECT_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
  1650. \${ac_uA}SYS_SELECT_WITH_SYS_TIME\${ac_uB}SYS_SELECT_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
  1651. \${ac_eA}SYS_SELECT_WITH_SYS_TIME\${ac_eB}SYS_SELECT_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
  1652. "
  1653. }
  1654.  
  1655.  
  1656. fi
  1657. rm -f conftest*
  1658.  
  1659.  
  1660. # checks for compiler characteristics
  1661.  
  1662. test -n "$silent" || echo "checking for unsigned characters"
  1663. cat > conftest.${ac_ext} <<EOF
  1664. #include "confdefs.h"
  1665. /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  1666. #if !__STDC__
  1667. #define volatile
  1668. #endif
  1669. main() {
  1670. #ifdef __CHAR_UNSIGNED__
  1671.   exit(1); /* No need to redefine it.  */
  1672. #else
  1673.   volatile char c = 255; exit(c < 0);
  1674. #endif
  1675. }
  1676. EOF
  1677. eval $ac_compile
  1678. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1679.   
  1680. {
  1681. test -n "$verbose" && \
  1682. echo "    defining __CHAR_UNSIGNED__"
  1683. echo "#define" __CHAR_UNSIGNED__ "1" >> confdefs.h
  1684. DEFS="$DEFS -D__CHAR_UNSIGNED__=1"
  1685. ac_sed_defs="${ac_sed_defs}\${ac_dA}__CHAR_UNSIGNED__\${ac_dB}__CHAR_UNSIGNED__\${ac_dC}1\${ac_dD}
  1686. \${ac_uA}__CHAR_UNSIGNED__\${ac_uB}__CHAR_UNSIGNED__\${ac_uC}1\${ac_uD}
  1687. \${ac_eA}__CHAR_UNSIGNED__\${ac_eB}__CHAR_UNSIGNED__\${ac_eC}1\${ac_eD}
  1688. "
  1689. }
  1690.  
  1691.  
  1692. fi
  1693. rm -fr conftest*
  1694.  
  1695.  
  1696. ac_prog='/* Ultrix mips cc rejects this.  */
  1697. typedef int charset[2]; const charset x;
  1698. /* SunOS 4.1.1 cc rejects this.  */
  1699. char const *const *ccp;
  1700. char **p;
  1701. /* AIX XL C 1.02.0.0 rejects this.
  1702.    It does not let you subtract one const X* pointer from another in an arm
  1703.    of an if-expression whose if-part is not a constant expression */
  1704. const char *g = "string";
  1705. ccp = &g + (g ? g-g : 0);
  1706. /* HPUX 7.0 cc rejects these. */
  1707. ++ccp;
  1708. p = (char**) ccp;
  1709. ccp = (char const *const *) p;
  1710. { /* SCO 3.2v4 cc rejects this.  */
  1711.   char *t;
  1712.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1713.  
  1714.   *t++ = 0;
  1715. }
  1716. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1717.   int x[] = {25,17};
  1718.   const int *foo = &x[0];
  1719.   ++foo;
  1720. }
  1721. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1722.   typedef const int *iptr;
  1723.   iptr p = 0;
  1724.   ++p;
  1725. }
  1726. { /* AIX XL C 1.02.0.0 rejects this saying
  1727.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1728.   struct s { int j; const int *ap[3]; };
  1729.   struct s *b; b->j = 5;
  1730. }
  1731. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1732.   const int foo = 10;
  1733. }'
  1734. test -n "$silent" || echo "checking for lack of working const"
  1735. cat > conftest.${ac_ext} <<EOF
  1736. #include "confdefs.h"
  1737.  
  1738. int main() { return 0; }
  1739. int t() { $ac_prog; return 0; }
  1740. EOF
  1741. if eval $ac_compile; then
  1742.   :
  1743. else
  1744.   rm -rf conftest*
  1745.   
  1746. {
  1747. test -n "$verbose" && \
  1748. echo "    defining" const to be empty
  1749. echo "#define" const "" >> confdefs.h
  1750. DEFS="$DEFS -Dconst="
  1751. ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
  1752. \${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
  1753. \${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
  1754. "
  1755. }
  1756.  
  1757. fi
  1758. rm -f conftest*
  1759.  
  1760.  
  1761. test -n "$silent" || echo "checking for lack of working volatile"
  1762. cat > conftest.${ac_ext} <<EOF
  1763. #include "confdefs.h"
  1764.  
  1765. int main() { return 0; }
  1766. int t() { volatile int x; x = 0;; return 0; }
  1767. EOF
  1768. if eval $ac_compile; then
  1769.   :
  1770. else
  1771.   rm -rf conftest*
  1772.   
  1773. {
  1774. test -n "$verbose" && \
  1775. echo "    defining" volatile to be empty
  1776. echo "#define" volatile "" >> confdefs.h
  1777. DEFS="$DEFS -Dvolatile="
  1778. ac_sed_defs="${ac_sed_defs}\${ac_dA}volatile\${ac_dB}volatile\${ac_dC}\${ac_dD}
  1779. \${ac_uA}volatile\${ac_uB}volatile\${ac_uC}\${ac_uD}
  1780. \${ac_eA}volatile\${ac_eB}volatile\${ac_eC}\${ac_eD}
  1781. "
  1782. }
  1783.  
  1784. fi
  1785. rm -f conftest*
  1786.  
  1787.  
  1788. test -n "$silent" || echo "checking for lack of working signed char"
  1789. cat > conftest.${ac_ext} <<EOF
  1790. #include "confdefs.h"
  1791.  
  1792. int main() { return 0; }
  1793. int t() { signed char c;; return 0; }
  1794. EOF
  1795. if eval $ac_compile; then
  1796.   :
  1797. else
  1798.   rm -rf conftest*
  1799.   
  1800. {
  1801. test -n "$verbose" && \
  1802. echo "    defining" signed to be empty
  1803. echo "#define" signed "" >> confdefs.h
  1804. DEFS="$DEFS -Dsigned="
  1805. ac_sed_defs="${ac_sed_defs}\${ac_dA}signed\${ac_dB}signed\${ac_dC}\${ac_dD}
  1806. \${ac_uA}signed\${ac_uB}signed\${ac_uC}\${ac_uD}
  1807. \${ac_eA}signed\${ac_eB}signed\${ac_eC}\${ac_eD}
  1808. "
  1809. }
  1810.  
  1811. fi
  1812. rm -f conftest*
  1813.  
  1814.  
  1815. test -n "$silent" || echo "checking for prototypes"
  1816. cat > conftest.${ac_ext} <<EOF
  1817. #include "confdefs.h"
  1818.  
  1819. int foo(int x) { return 0; }
  1820. int main() { return foo(10); }
  1821.  
  1822. EOF
  1823. eval $ac_compile
  1824. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1825.   
  1826. {
  1827. test -n "$verbose" && \
  1828. echo "    defining HAVE_PROTOTYPES"
  1829. echo "#define" HAVE_PROTOTYPES "1" >> confdefs.h
  1830. DEFS="$DEFS -DHAVE_PROTOTYPES=1"
  1831. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_PROTOTYPES\${ac_dB}HAVE_PROTOTYPES\${ac_dC}1\${ac_dD}
  1832. \${ac_uA}HAVE_PROTOTYPES\${ac_uB}HAVE_PROTOTYPES\${ac_uC}1\${ac_uD}
  1833. \${ac_eA}HAVE_PROTOTYPES\${ac_eB}HAVE_PROTOTYPES\${ac_eC}1\${ac_eD}
  1834. "
  1835. }
  1836.  have_prototypes=1
  1837.  
  1838. fi
  1839. rm -fr conftest*
  1840.  
  1841. test -n "$silent" || echo "checking for variable length prototypes and stdarg.h"
  1842. cat > conftest.${ac_ext} <<EOF
  1843. #include "confdefs.h"
  1844.  
  1845. #include <stdarg.h>
  1846. int foo(int x, ...) { return 0; }
  1847. int main() { return foo(10, 11, 12); }
  1848.  
  1849. EOF
  1850. eval $ac_compile
  1851. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1852.   
  1853. {
  1854. test -n "$verbose" && \
  1855. echo "    defining HAVE_STDARG_PROTOTYPES"
  1856. echo "#define" HAVE_STDARG_PROTOTYPES "1" >> confdefs.h
  1857. DEFS="$DEFS -DHAVE_STDARG_PROTOTYPES=1"
  1858. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_STDARG_PROTOTYPES\${ac_dB}HAVE_STDARG_PROTOTYPES\${ac_dC}1\${ac_dD}
  1859. \${ac_uA}HAVE_STDARG_PROTOTYPES\${ac_uB}HAVE_STDARG_PROTOTYPES\${ac_uC}1\${ac_uD}
  1860. \${ac_eA}HAVE_STDARG_PROTOTYPES\${ac_eB}HAVE_STDARG_PROTOTYPES\${ac_eC}1\${ac_eD}
  1861. "
  1862. }
  1863.  have_prototypes=1
  1864.  
  1865. fi
  1866. rm -fr conftest*
  1867. if test "$have_prototypes"; then
  1868. test -n "$silent" || echo "checking for "bad exec* prototypes""
  1869. cat > conftest.${ac_ext} <<EOF
  1870. #include "confdefs.h"
  1871. #include <unistd.h>
  1872. int main() { return 0; }
  1873. int t() { char **t;execve("@",t,t);; return 0; }
  1874. EOF
  1875. if eval $ac_compile; then
  1876.   :
  1877. else
  1878.   rm -rf conftest*
  1879.   
  1880. {
  1881. test -n "$verbose" && \
  1882. echo "    defining BAD_EXEC_PROTOTYPES"
  1883. echo "#define" BAD_EXEC_PROTOTYPES "1" >> confdefs.h
  1884. DEFS="$DEFS -DBAD_EXEC_PROTOTYPES=1"
  1885. ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_EXEC_PROTOTYPES\${ac_dB}BAD_EXEC_PROTOTYPES\${ac_dC}1\${ac_dD}
  1886. \${ac_uA}BAD_EXEC_PROTOTYPES\${ac_uB}BAD_EXEC_PROTOTYPES\${ac_uC}1\${ac_uD}
  1887. \${ac_eA}BAD_EXEC_PROTOTYPES\${ac_eB}BAD_EXEC_PROTOTYPES\${ac_eC}1\${ac_eD}
  1888. "
  1889. }
  1890.  
  1891. fi
  1892. rm -f conftest*
  1893.  
  1894. fi
  1895.  
  1896. test -n "$silent" || echo "checking for bad static forward"
  1897. cat > conftest.${ac_ext} <<EOF
  1898. #include "confdefs.h"
  1899.  
  1900. struct s { int a; int b; };
  1901. static struct s foo;
  1902. int foobar() { return !foo.a; }
  1903. static struct s foo = { 1, 2 };
  1904. main() { exit(foobar()); }
  1905.  
  1906. EOF
  1907. eval $ac_compile
  1908. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1909.   :
  1910. else
  1911.   
  1912. {
  1913. test -n "$verbose" && \
  1914. echo "    defining BAD_STATIC_FORWARD"
  1915. echo "#define" BAD_STATIC_FORWARD "1" >> confdefs.h
  1916. DEFS="$DEFS -DBAD_STATIC_FORWARD=1"
  1917. ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_STATIC_FORWARD\${ac_dB}BAD_STATIC_FORWARD\${ac_dC}1\${ac_dD}
  1918. \${ac_uA}BAD_STATIC_FORWARD\${ac_uB}BAD_STATIC_FORWARD\${ac_uC}1\${ac_uD}
  1919. \${ac_eA}BAD_STATIC_FORWARD\${ac_eB}BAD_STATIC_FORWARD\${ac_eC}1\${ac_eD}
  1920. "
  1921. }
  1922.  
  1923. fi
  1924. rm -fr conftest*
  1925.  
  1926. # checks for system services
  1927. # (none yet)
  1928.  
  1929. # other checks for UNIX variants
  1930. ac_save_LIBS="${LIBS}"
  1931. LIBS="${LIBS} -lsun"
  1932. ac_have_lib=""
  1933. test -n "$silent" || echo "checking for -lsun"
  1934. cat > conftest.${ac_ext} <<EOF
  1935. #include "confdefs.h"
  1936.  
  1937. int main() { return 0; }
  1938. int t() { main();; return 0; }
  1939. EOF
  1940. if eval $ac_compile; then
  1941.   rm -rf conftest*
  1942.   ac_have_lib="1"
  1943.  
  1944. fi
  1945. rm -f conftest*
  1946. LIBS="${ac_save_LIBS}"
  1947. if test -n "${ac_have_lib}"; then
  1948.    :; LIBS="$LIBS -lsun"
  1949. else
  1950.    :; 
  1951. fi
  1952.  
  1953.  
  1954. test -n "$silent" || echo "checking for Xenix"
  1955. cat > conftest.${ac_ext} <<EOF
  1956. #include "confdefs.h"
  1957. #if defined(M_XENIX) && !defined(M_UNIX)
  1958.   yes
  1959. #endif
  1960.  
  1961. EOF
  1962. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1963. if egrep "yes" conftest.out >/dev/null 2>&1; then
  1964.   rm -rf conftest*
  1965.   XENIX=1
  1966.  
  1967. fi
  1968. rm -f conftest*
  1969.  
  1970. if test -n "$XENIX"; then
  1971.   LIBS="$LIBS -lx"
  1972.   case "$DEFS" in
  1973.   *SYSNDIR*) ;;
  1974.   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
  1975.   esac
  1976. fi
  1977.  
  1978.  
  1979. # check for --with-libm=...
  1980.  
  1981. LIBM=-lm
  1982. # check whether --with-libm or --without-libm was given.
  1983. withval="$with_libm"
  1984. if test -n "$withval"; then
  1985.   if test "$withval" != yes
  1986. then LIBM=$withval
  1987. else echo "configure: proper usage is --with-libm=STRING" >&2; exit 1
  1988. fi
  1989. fi
  1990.  
  1991.  
  1992. # check for --with-libc=...
  1993.  
  1994. # check whether --with-libc or --without-libc was given.
  1995. withval="$with_libc"
  1996. if test -n "$withval"; then
  1997.   if test "$withval" != yes
  1998. then LIBC=$withval
  1999. else echo "configure: proper usage is --with-libc=STRING" >&2; exit 1
  2000. fi
  2001. fi
  2002.  
  2003.  
  2004. # generate output files
  2005.  
  2006. # The preferred way to propogate these variables is regular @ substitutions.
  2007. if test -n "$prefix"; then
  2008.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  2009. else
  2010.   prefix=/usr/local
  2011. fi
  2012. if test -n "$exec_prefix"; then
  2013.   ac_prsub="$ac_prsub
  2014. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  2015. else
  2016.   exec_prefix='${prefix}' # Let make expand it.
  2017. fi
  2018.  
  2019. # Any assignment to VPATH causes Sun make to only execute
  2020. # the first set of double-colon rules, so remove it if not needed.
  2021. # If there is a colon in the path, we need to keep it.
  2022. if test "x$srcdir" = x.; then
  2023.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2024. fi
  2025.  
  2026. # Quote sed substitution magic chars in DEFS.
  2027. cat >conftest.def <<EOF
  2028. $DEFS
  2029. EOF
  2030. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  2031. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  2032. rm -f conftest.def
  2033. # Substitute for predefined variables.
  2034.  
  2035. trap 'rm -f config.status; exit 1' 1 2 15
  2036. echo creating config.status
  2037. rm -f config.status
  2038. cat > config.status <<EOF
  2039. #!/bin/sh
  2040. # Generated automatically by configure.
  2041. # Run this file to recreate the current configuration.
  2042. # This directory was configured as follows,
  2043. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2044. #
  2045. # $0 $configure_args
  2046.  
  2047. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  2048. for ac_option
  2049. do
  2050.   case "\$ac_option" in
  2051.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2052.     echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  2053.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  2054.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2055.     echo "config.status generated by autoconf version 1.11"
  2056.     exit 0 ;;
  2057.   -help | --help | --hel | --he | --h)
  2058.     echo "\$ac_cs_usage"; exit 0 ;;
  2059.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2060.   esac
  2061. done
  2062.  
  2063. trap 'rm -fr Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre config.h conftest*; exit 1' 1 2 15
  2064. CC='$CC'
  2065. RANLIB='$RANLIB'
  2066. AR='$AR'
  2067. INSTALL='$INSTALL'
  2068. OPT='$OPT'
  2069. CPP='$CPP'
  2070. MACHDEP='$MACHDEP'
  2071. SO='$SO'
  2072. LDSHARED='$LDSHARED'
  2073. CCSHARED='$CCSHARED'
  2074. LINKFORSHARED='$LINKFORSHARED'
  2075. DLINCLDIR='$DLINCLDIR'
  2076. LIBOBJS='$LIBOBJS'
  2077. LIBM='$LIBM'
  2078. LIBC='$LIBC'
  2079. LIBS='$LIBS'
  2080. srcdir='$srcdir'
  2081. top_srcdir='$top_srcdir'
  2082. prefix='$prefix'
  2083. exec_prefix='$exec_prefix'
  2084. ac_prsub='$ac_prsub'
  2085. ac_vpsub='$ac_vpsub'
  2086. extrasub='$extrasub'
  2087. EOF
  2088. cat >> config.status <<\EOF
  2089.  
  2090. ac_given_srcdir=$srcdir
  2091.  
  2092. CONFIG_FILES=${CONFIG_FILES-"Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre"}
  2093. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  2094.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2095.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2096.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2097.     # The file is in a subdirectory.
  2098.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2099.     ac_dir_suffix="/$ac_dir"
  2100.   else
  2101.     ac_dir_suffix=
  2102.   fi
  2103.  
  2104.   # A "../" for each directory in $ac_dir_suffix.
  2105.   ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2106.   case "$ac_given_srcdir" in
  2107.   .)  srcdir=.
  2108.       if test -z "$ac_dir_suffix"; then top_srcdir=.
  2109.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2110.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2111.   *) # Relative path.
  2112.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2113.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2114.   esac
  2115.  
  2116.   echo creating "$ac_file"
  2117.   rm -f "$ac_file"
  2118.   comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  2119.   case "$ac_file" in
  2120.     *.c | *.h | *.C | *.cc | *.m )  echo "/* $comment_str */" > "$ac_file" ;;
  2121.     * )          echo "# $comment_str"     > "$ac_file" ;;
  2122.   esac
  2123.   sed -e "
  2124. $ac_prsub
  2125. $ac_vpsub
  2126. $extrasub
  2127. s%@CC@%$CC%g
  2128. s%@RANLIB@%$RANLIB%g
  2129. s%@AR@%$AR%g
  2130. s%@INSTALL@%$INSTALL%g
  2131. s%@OPT@%$OPT%g
  2132. s%@CPP@%$CPP%g
  2133. s%@MACHDEP@%$MACHDEP%g
  2134. s%@SO@%$SO%g
  2135. s%@LDSHARED@%$LDSHARED%g
  2136. s%@CCSHARED@%$CCSHARED%g
  2137. s%@LINKFORSHARED@%$LINKFORSHARED%g
  2138. s%@DLINCLDIR@%$DLINCLDIR%g
  2139. s%@LIBOBJS@%$LIBOBJS%g
  2140. s%@LIBM@%$LIBM%g
  2141. s%@LIBC@%$LIBC%g
  2142. s%@LIBS@%$LIBS%g
  2143. s%@srcdir@%$srcdir%g
  2144. s%@top_srcdir@%$top_srcdir%g
  2145. s%@prefix@%$prefix%g
  2146. s%@exec_prefix@%$exec_prefix%g
  2147. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  2148. fi; done
  2149.  
  2150. # These sed commands are put into ac_sed_defs when defining a macro.
  2151. # They are broken into pieces to make the sed script easier to manage.
  2152. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  2153. # is the cpp macro being defined and VALUE is the value it is being given.
  2154. # Each defining turns into a single global substitution command.
  2155. # Hopefully no one uses "!" as a variable value.
  2156. # Other candidates for the sed separators, like , and @, do get used.
  2157. #
  2158. # ac_d sets the value in "#define NAME VALUE" lines.
  2159. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2160. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  2161. ac_dC='\3'
  2162. ac_dD='!g'
  2163. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2164. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2165. ac_uB='\([     ]\)!\1#\2define\3'
  2166. ac_uC=' '
  2167. ac_uD='\4!g'
  2168. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2169. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2170. ac_eB='$!\1#\2define\3'
  2171. ac_eC=' '
  2172. ac_eD='!g'
  2173. rm -f conftest.sed
  2174. EOF
  2175. # Turn off quoting long enough to insert the sed commands.
  2176. rm -f conftest.sh
  2177. cat > conftest.sh <<EOF
  2178. $ac_sed_defs
  2179. EOF
  2180.  
  2181. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  2182. # on the size of here documents.
  2183.  
  2184. # Maximum number of lines to put in a single here document.
  2185. ac_max_sh_lines=9
  2186.  
  2187. while :
  2188. do
  2189.   # wc gives bogus results for an empty file on some AIX systems.
  2190.   ac_lines=`grep -c . conftest.sh`
  2191.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2192.   rm -f conftest.s1 conftest.s2
  2193.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
  2194.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
  2195.   # Write a limited-size here document to append to conftest.sed.
  2196.   echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  2197.   cat conftest.s1 >> config.status
  2198.   echo 'CONFEOF' >> config.status
  2199.   rm -f conftest.s1 conftest.sh
  2200.   mv conftest.s2 conftest.sh
  2201. done
  2202. rm -f conftest.sh
  2203.  
  2204. # Now back to your regularly scheduled config.status.
  2205. cat >> config.status <<\EOF
  2206. # This sed command replaces #undef's with comments.  This is necessary, for
  2207. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2208. # on some systems where configure will not decide to define it in
  2209. # config.h.
  2210. cat >> conftest.sed <<\CONFEOF
  2211. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  2212. CONFEOF
  2213. rm -f conftest.h
  2214. # Break up the sed commands because old seds have small limits.
  2215. ac_max_sed_lines=20
  2216.  
  2217. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  2218. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  2219.   echo creating $ac_file
  2220.  
  2221.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  2222.   cp conftest.sed conftest.stm
  2223.   while :
  2224.   do
  2225.     ac_lines=`grep -c . conftest.stm`
  2226.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2227.     rm -f conftest.s1 conftest.s2 conftest.h2
  2228.     sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
  2229.     sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
  2230.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  2231.     rm -f conftest.s1 conftest.h1 conftest.stm
  2232.     mv conftest.h2 conftest.h1
  2233.     mv conftest.s2 conftest.stm
  2234.   done
  2235.   rm -f conftest.stm conftest.h
  2236.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2237.   cat conftest.h1 >> conftest.h
  2238.   rm -f conftest.h1
  2239.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2240.     # The file exists and we would not be changing it.
  2241.     echo "$ac_file is unchanged"
  2242.     rm -f conftest.h
  2243.   else
  2244.     rm -f $ac_file
  2245.     mv conftest.h $ac_file
  2246.   fi
  2247. fi; done
  2248. rm -f conftest.sed
  2249.  
  2250.  
  2251.  
  2252. exit 0
  2253. EOF
  2254. chmod +x config.status
  2255. # Some shells look in PATH for config.status without the "./".
  2256. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
  2257.  
  2258.